import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

driver.get("https://www.icourse163.org/")
print("base_url:", driver.current_url)

driver.find_element(By.CLASS_NAME, "nav").click()
time.sleep(2)
print('after search: ', driver.current_url)
time.sleep(5)
driver.back()
print('back to: ', driver.current_url)
time.sleep(2)
driver.forward()
print('forward to: ', driver.current_url)

time.sleep(2)
driver.refresh()
print('refresh: ', driver.current_url)

time.sleep(5)
logo = driver.find_element(By.XPATH, "//*[@id=\"j-indexNav-bar\"]/div/div/div/div/div[1]/a/img")
logo.click()
print('go to: ', driver.current_url)

time.sleep(5)
driver.quit()
